export interface ICreateUser {
  mail: string
  name: string
  password: string
}

export interface IUserLogin {
  mail: string
  password: string
}

export interface IUserDetailUpdate {
  name: string
  phone: string
  qq: string
  wechat: string
  password?: string
}

export namespace createUserRes {
  export interface User {
    mail: string
    password: string
    name: string
    phone?: string
    wechat?: string
    qq?: string
    id: number
    role: string
    createTime: Date
    updateTime: Date
  }

  export interface Data {
    user: User
  }

  export interface RootObject {
    statusCode: number
    message: string
    data: Data
  }
}

export namespace userLoginRes {
  export interface User {
    id: number
    name: string
    mail: string
    phone?: string
    wechat?: string
    qq?: string
    role: string
    createTime: Date
    updateTime: Date
  }

  export interface Data {
    user: User
    token: string
  }

  export interface RootObject {
    statusCode: number
    message: string
    data: Data
  }
}

export namespace userDetail {
  export interface User {
    id: number
    name: string
    mail: string
    phone: string
    wechat: string
    qq: string
    role: string
    createTime: Date
    updateTime: Date
  }

  export interface Data {
    user: User
  }

  export interface RootObject {
    statusCode: number
    message: string
    data: Data
  }
}
